]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Restore selected pseudo-class
authorSam Hewitt <snwh@gnome.org>
Fri, 19 Jan 2024 14:56:34 +0000 (11:26 -0330)
committerMarge Bot <marge-bot@gnome.org>
Tue, 6 Feb 2024 20:09:20 +0000 (20:09 +0000)
- move styles to switcher-popup
- reverts a change in a code clean up that causes problems with screen readers

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7336
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3127>

data/theme/gnome-shell-sass/_drawing.scss
data/theme/gnome-shell-sass/widgets/_switcher-popup.scss
js/ui/switcherPopup.js

index 167cff70f7b360c0939619a076049bb56fba5580..f89f96f2a0bc4731d04e3fcbb0d8f8a1bdd48291 100644 (file)
     &:focus { @include button(focus, $tc:$fg, $c:$bg, $always_dark: $system);}
     &:hover { @include button(hover, $tc:$fg, $c:$bg, $always_dark: $system);}
     &:active { @include button(active, $tc:$fg, $c:$bg, $always_dark: $system);}
-    &:selected,
+    &:highlighted,&:selected,
     &:checked { @include button(checked, $tc:$fg, $c:$bg, $always_dark: $system);}
     &:insensitive { @include button(insensitive, $tc:$fg, $c:$bg, $always_dark: $system);}
   } @else {
     &:focus { @include button(focus, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
     &:hover { @include button(hover, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
     &:active { @include button(active, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
-    &:selected,
+    &:highlighted,&:selected,
     &:checked { @include button(checked, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
     &:insensitive { @include button(insensitive, $tc:$fg, $c:$bg, $style: flat, $always_dark: $system);}
   }
 
-
-  &:highlighted {
-    // brighter background color than other states
-    $bg: transparentize($fg, 0.8);
-    @include button(active, $tc:$fg, $c:$bg, $always_dark: $system);
-  }
-
   &:drop {
     background-color: transparentize($selected_bg_color, .8);
     box-shadow: inset 0 0 0 2px transparentize($selected_bg_color, .2);
index 26234723758bdeba89fa2a5d943dac673e22da79..bf534b0471d615717991fc9e70eee2c707e6192d 100644 (file)
@@ -27,6 +27,17 @@ $switcher_radius: $modal_radius + $switcher_padding;
     @include tile_button($fg:$osd_fg_color, $bg:$osd_bg_color);
     // override %tile style so mouse doesn't steal focus
     &:hover {background: none;}
+
+    // brighter than normal selected style
+    &:selected {
+      background-color: transparentize($osd_fg_color, 0.8);
+    }
+
+    @if $contrast == 'high' {
+      &:selected {
+        background-color: transparentize($osd_fg_color, 0.7);
+      }
+    }
   }
 
   .separator {
index fd99b8374ac2dadb97ff4b0bcf7fdb58c50e7fbb..e9bf080650bd406318ae8b42bc6be90a59efaa1f 100644 (file)
@@ -494,9 +494,9 @@ export const SwitcherList = GObject.registerClass({
 
         if (this._items[index]) {
             if (justOutline)
-                this._items[index].add_style_pseudo_class('selected');
-            else
                 this._items[index].add_style_pseudo_class('highlighted');
+            else
+                this._items[index].add_style_pseudo_class('selected');
         }
 
         this._highlighted = index;